package com.test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.sql.DataSource;

public class DemoTest03 {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
    @Test
    public void m1(){
        DataSource dataSource = (DataSource) ctx.getBean("dataSource2");
        System.out.println(dataSource);
    }
}
